perm filename COMAND.DOC[SYS,HE] blob sn#048183 filedate 1973-06-12 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00017 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00003 00002			INTRODUCTION and DISPLAY
C00006 00003			FILE NAMES
C00009 00004			PARSE FLAGS
C00016 00005			LINE AND VERTEX DATA STRUCTURE
C00023 00006			COMMAND STRUCTURE AND COMMANDS
C00028 00007			DO, H, D, DD, and PRINT COMMANDS
C00032 00008			MARK, UNMARK, MOVE, UPDIS, BLANK, PLOT, NO
C00035 00009			SET COMMAND
C00038 00010			CALL COMMAND
C00041 00011			INPUT and SAVE COMMANDS
C00045 00012			SHOW, KILL, CLEAR, and CLOSE COMMANDS
C00047 00013			EDIT COMMAND (COM and PROT)
C00051 00014			EDIT COMMAND (PARAM)
C00055 00015			EDIT COMMAND (PARAM cont. AND LINES)
C00059 00016			EDIT COMMAND (LINES cont.)
C00061 00017			OPERATION
C00065 ENDMK
C⊗;
		INTRODUCTION and DISPLAY

			INTRODUCTION

	This file contains, hopefully, all  the information needed to
run  GUNLO, Gunnar  Grape's line fitter  and model  driven segmenter.
The program is on GUNLO.DMP[SYS,HE] and  can be run on either a  data
disk or III console.  It will  run faster on the III, however, if the
display is being updated often.

	Before reading the section on commands,  the user should read
the sections below  to gain sufficient understanding of the structure
of the  program to understand  the command  descriptions.   Following
the command descriptions is a section on  operation the system, which
may make  other parts of this document clearer.  Users who want to do
only  very simple  things,  and  are  not  too  concerned  with  nice
displays and  understanding what is  going on might start  by reading
the  section on operation, try to run  the program, and then read the
other sections as  they find  it necessary or  useful. For those  who
are  interested,     more  complete  documentation   on  the  program
structure can be found in STRUCT.DOC[SYS,HE].

			THE DISPLAY

	The  program's  display  consists  of  six  pieces  of  glass
(POGs). Many  of the commands will alter  the contents of, or display
status of,  one or  more POGs  when executed.   The  display will  be
updated  immediately  after  the  execution of  the  command,  unless
display  updating is being  suppressed (see  D and H  commands).  The
POGs are:

POG	CONTENTS

1	the rectangular frame around the limits of the display area
2	the edge points (see SHOW EDGE)
3	the edge point numbers (see MARK EDGES)
4	the active scene lines
5	the line IDs (see MARK LINES)
6	the composite vertex IDs (see MARK VERTICES)
		FILE NAMES

	The program can  read in and  save (using the SAVE  and INPUT
commands)   the  prototype  data  structure,   the  line  and  vertex
structure, and the edge points.   Prototype and line structure  files
can have any name the user  wishes.  The standard prototype structure
is  in file  PROTO.GUN[SYS,HE].   If,  during program  execution, the
arrays allocated for one or more of the data  structures are found to
be  too small, the  arrays for  those structures are  reallocated. If
the contents  of the  arrays have  changed since  they were  read  in
last,  they  are   written  on  files  EDSAVE.TEM,   LISAVE.TEM,  and
PRSAVE.TEM.   The  latest files are  then read  back in and,  if .TEM
fils, deleted after reallocation is finished.

	Only four  extensions  are recognized  for  files  containing
edges points.  They are:

	.DAT	edge points from Hueckel edge scanner
	.EDG	edge points from EDGE (using GETDATA command)
	.SED	sorted edge points written out by GUNLO
	.TEM	temporary save file written out by GUNLO

	In  addition to  the above  files, four  output files  can be
generated  by GUNLO.   The  are called  NAME&N&EXT where NAME  is the
scene name  which can  be  set by  the user.   It  is  five or  fewer
letters  and is initially  Z00.  N  is initially  A for each  type of
file, and is incremented one letter  for each file generated of  each
type.  EXT defines the type of output and is:

	.OUT	list of active lines and the  vertex  structure  (see
		the SHOW STRUCT command)
	.GRF	dump of  portions of  the display buffer for plotting
		on  the CALCOMP  by PLTVEC  or  generating video with
		MIRTOP (see PLOT command)
	.LPT	list  of main  features of  data structure (see PRINT
	 	REGREF command)
	.TRC	trace  output  (see  CALL PARSE  command  and section
		below). The trace file name does not follow the above
		convention.
		PARSE FLAGS

	The argument  of the  CALL PARSE  command is  a string  which
defines the  options the user wants during this  run.  The string may
be one of two key words:

	NULL	means parse the current scene with no stops or output.
		This is the normal argument for production runs.
  
	RESET	causes  the  parser  to  restore  the  internal  data
		structure to its  status before  the last call of the
		parser and then exit  without parsing.  The next call
		of the parser  can then  reparse  the  current  scene
		without having to redo the processing of the scene up
		to that point.

	For debugging,  or just  watching the  parser in  action,   a
large  number of flags may  be given as  the argument.   Users who do
not want to debug  or see the  parser run can skip  the rest of  this
section. The flags  are entered as two letter codes  and the argument
then consists  of a series of these codes, in any order, concatenated
together with no  blanks between  them.  The  codes are listed  below
with as  much description  as can currently  be provided (I  have not
used most of them yet).  Knowledge of Gunnar's thesis is valuable  in
understanding the descriptions.

CODE	DESCRIPTION
.....................................................................
NR	display each new ray

OV	display each orbited vertex

PM	display each partial mapping

BM	Display  best partial  mapping for each prototype feature and
	object. The mapping routine tries to map each feature of each
	prototype which can be  found  in  the scene  into the scene.
	The best mapping for each feature is  displayed.  The  string
	BEST (MAP) is typed, along with the prototype name and score.
	The score is given as n/nnnnnnnn, where the first number is 1
	if a complete parse was found.  The second number is the out-
	put of the grading routine.
	
BP	Display best partial mapping for each object parsed. The map-
	ping which the parser selected as the best possible match  is
	displayed.  The string BEST(PARSE) is typed, along  with  the
	prototype name and score. 

TT	output trace to TTY in addition to the disk

SK	display scene for each key

SI	Display  scene after  each isolation  of an  object. After an
	object has  been parsed  and its structure made inactive, the
	remaining portion of the scene is displayed. This is what the
	parser will work on next. The string SCENE is typed when this
	display appears.


PI	Pause and input flags.  If this code appears after any of the
	above flags, the program will wait for input after generating
	the display. A D will be typed to indicate it is waiting. The
	program will continue with the same flags if you type : at it.
	If you type ←string:,  string will  be the  new set  of flags
	(don't try RESET here; you will lose big).   PI is not recog-
	nized if typed at the beginning of the string or after any of
	the flags below.


TD	Send  trace output  to disk  file PARSnn.TRC,  where n  is  a
	number which is incremented by one for each file.The contents
	of the trace file will not be explained here.

PK	pause after each new key

TL	Type  line numbers of trace output as generated.  For linking
	action of parse as user sees it to trace output at that point.

PD	output current display for plotting, as in PLOT command

PR	execute PRINT REGREF 11 after each isolation.

	A typical string might  be BPPISIPI which will show  the best
parse  for  each  object,  and what  the  scene  looks  like with  it
removed, pausing after each display.  

	If you make a  mistake in the  string, the program will  type
CODES NOT  RECOGNIZED: followed  by the codes  it did  not recognize,
seperated  by blanks.   It will then  clear the TTY  input buffer and
wait for you  to retype  the string, followed  by a carriage  return,
and try to decode it again.
		LINE AND VERTEX DATA STRUCTURE

	Each line in  the scene is  assigned a numeric ID,  which you
can display  if you wish.  With each line  is a creation number.  The
number assigned to  a line  is the value  of LDATE when  the line  is
created.  This  cell normally contains 1 unless changed  by the user.
A line  is said to be active if its creation number C is in the range
LNCRE1≤C≤LNCRE2,  where LNCRE1  and  LNCRE2  are altered  by  various
sections of GUNLO, and can  be changed by the user.  Their values are
1 initially, so all created lines are active.

	As  the  parser  seperates  objects,  their  lines  are  made
inactive by giving  them higher numbers. Numbers 1-1000  are reserved
for  initial  scene lines.   They  may  be used  to  assign different
numbers to  difference  prototypes being  created, or  scene  objects
being  created by  the line  editor  so the  user can  refer to  each
object's  lines  seperately  by changing  the  limits  of  the active
lines.

	Numbers 1001-2000 are used  by the parser internally  to mark
its  current  status.   Numbers  2001-3000  hold  the  output of  the
parser. The  finished mappings  are numbered  1, 2,  3, etc.  in  the
order they  are parsed.   For mapping  I, the  lines of the  original
scene  which  appear  in  it  are  assigned  2000+I*2 and  the  lines
inserted by  the mapping  routines are  assigned  2000+(I*2-1).   The
lines of the original scene which  were replaced by inserted lines of
this  object  are  assigned  3000+I.    Therefore,  if  LNCRE1←1  and
LNCRE2←1000, all the scene lines  not yet parsed are active  and will
be  displayed,  as well  as  being available  for  processing by  the
various parts of GUNLO, most of  which only operate on active  lines.
If LNCRE←2001  and LNCRE←3000, the  parsed objects will  be displayed
and available for processing, or outputting to other programs.

	In  GUNLO, each line  has a  three element stack,  the LCREDE
stack, to  hold  the creation  number so  the  line's status  can  be
backed up if necessary.

	In  the command  descriptions,  lines are  also described  as
temporary  or  permanent.   This distiction  can  be ignored,  as the
program currently  does.   All lines  are assumed  to be  temporarily
permanent (permanently temporary?).

	When the  line fitter creates  the original scene  lines, the
ends of the  lines are shrunk  back a small  amount from where  their
edge points ended  and these ends  define the line's  simple vertices
(SVs).  For  created lines, the mapping routines assign end points as
they see fit.   Once SVs  are created for  a line, their  coordinates
will never change.   For line I, its SVs have the  IDs I*2-1 and I*2.
The line is considered to be directed from the former to the latter.

	Each  SV is linked to a composite  vertex (CV) with points to
SVs of  all the lines  which intersect at  a given  point.  When  the
line fitter  creates lines, each  SV has a  unique CV, with  the same
coordinates.  In the parser the  XREF routine is called to find  line
intersections.   This routine  then merges  CVs of intersected  lines
and  given them the  coordinates of the  intersection.   If more than
two lines  intersect  in  a  small area,  the  weighted  least-square
coordinates  of their  common  intersection is  assigned  to the  CV.
These  coordinates change  whenever lines  are added or  removed from
the CV.  When the parser has finished isolating  an object, its lines
are made  inactive and the CVs  associated with it  are unlinked from
all lines still  active.   The active  lines are  then unlinked  from
each other, with a unique CV assigned to each  SV again, for the next
pass  of the  parser.  The  IDs of  the CVs  can be displayed  by the
user.  When lines  are displayed, the  value of boolean CVLIN,  which
the  user can  change,  determines whether  lines  will be  displayed
using  their SVs (which will show gaps  between lines) or using their
CVs.
		COMMAND STRUCTURE AND COMMANDS

	Each command  consists of a  main command,  possibly followed
by  arguments or subcommands.   Subcommands  may then be  followed by
arguments.  When the program is  ready for a command string, it  will
type  *.   It  then expects  a  line starting  with  a main  command,
possibly   followed  by  arguments,   subcommands,  or  further  main
commands.   The program  decodes the main  command.   If it  requires
subcommands, it then  looks for one of them.   Whenever arguments are
expected, they must appear.  When a subcommand has been executed  and
the  line has  not  been  exhaused,  the program  looks  for  another
subcommand  for its current  main command.   If the next  part of the
line is  not recognized  as a  subcommand, the  program  goes up  one
level and tests  it for a main command.   Commands not recognized are
ignored;  no error message is returned, in  general.  See the section
on OPERATION at the end of the opus for examples of command usage.

	When the initial command line is typed in, the  program is in
line mode so you can  edit the line if necessary.  After the carriage
return is  typed, the  entire line  is processed,  with each  command
being  executed  immediately  as it  is  recognized.    Some  of  the
commands  are interactive, giving  current values  of their arguments
before looking for new  values in the argument  list.  If the  entire
command is  given on  a single  line this  interaction will  not take
place.   If  however,  a carriage  return is  typed before  the first
subcommand for a  main command,  or before all  of the arguments  are
entered,   the program will  begin entering  your input in  character
mode  and will  allow interaction.  The command  decoder will  try to
process the input  whenever a seperation character  is seen. In  this
mode,  if  you make a mistake, typing ?  before typing any seperation
characters  after  a subcommand  or  argument,  will cause  it  to be
ignored.   Typing a  carriage return where  a main  command might  be
expected will get you back into line mode.

	Below  is  the   list  of  all  main   commands  the  program
recognizes.  Most of them  are for  debugging and some  may not work.
The  subcommands  are  listed  following  their   main  command,  and
indented  from  them.   The  arguments are  listed  as small  letters
following the  command and  are all  interactive unless  noted.   All
commands function as mentioned in the  section above unless otherwise
noted with  the command. Commands (or subcommands)  followed by ⊗ are
the  principal  commands  you  need  to  operate  the  program  on  a
production basis.   The  others are  debugging and  special commands;
their operation and description are not guaranteed.
		DO, H, D, DD, and PRINT COMMANDS

DO ⊗		Executes stored  strings as though you had typed them
		in. A  question mark  will be typed if the subcommand
		is not  recognized.  The subcommand arguments are not
		interactive. This  command always  returns for  a new
		main command when the stored string is terminated.

	FILE a		Execute command file a. It is read in line by
			line and executed the same as typed in input.
			The file input  is  terminated  by eof  or ⊗.
			Files may be  nested up to 10 deep if you are
			very brave. Prototypes are currently generat-
			ed by creating files of commands for the line
			editor.  A error message is typed if the file
			does not  exist.

	COM a		Execute stored command string.The program can
			hold  up to  10 command  strings (entered  by
			means of the  command editor  -  see EDIT COM
			command).  This command  will cause execution
			of string a.  If ¬(0≤a≤10) the  program  will
			die. If the string contains a DO COM command,
			the  rest  of  the  current  string  will  be
			appended to the end of the new string.  If it
			contains a DO FILE command,  the rest  of the
			current  string is  stacked and  will  resume
			when the file is finished.   Strings  0-2 are
			compiled-in command strings useful for normal
			processing.  See section  on operation  for a
			description of them.

H ⊗		Normally  the display  is updated  after each command
		which can alter it.   When typing a long command line
		it is often a lengthy wait while each command updates
		the display.   This command  holds  display  updating
		until the D command is seen.

D ⊗		Release  display for updates, if H command was given,
		and do  an immediate  update if any changes have been
		made.

DD		Goes  to RAID  if breakpoint set at label DD in block
		BLOCK3.  RAID is not normally loaded with the version
		on SYS,HE.

PRINT	REGREF a	Print main features of the data structure  on
			file NAMEn.LPT. If the ones  digit of  a (not
			interactive) is non-zero,  the line  data  is
			printed.  If the tens digit is 	non-zero, the
			vertex data is printed.
		MARK, UNMARK, MOVE, UPDIS, BLANK, PLOT, NO

MARK		Marks IDs of selected structures in display.

	EDGES		Show  first 100  edge pairs by number, with -
			before number if edge  pair is linked to pre-
			ceding pair in same line and with - after the
			number if it is linked to the next pair.

	VERTICES	Show CVs by Vn (where n is the ID) positioned
			near the location of the CV.

	LINES		Show IDs of active lines.  + appears with the
			ID if the  line is  directed in the +Y direc-
			tion, - otherwise. The + or - is after the ID
			if the line is  directed in  the +X direction,
			before it otherwise.

UNMARK		Turns off ID display for selected structures.

	EDGES		Unmark edge pairs

	VERTICES	Unmark vertices

	LINES		Unmark lines

MOVE a b	Moves display by changing origin of internal coordin-
		ate system to a,b.  See SET INTRPT command.

UPDIS a		Force display update for all POGs  if a≠0 (not inter-
		active); for all POGs  which have  been changed since
		the last update otherwise.

BLANK		Blank page printer (to take a picture of display?)

PLOT a b ... n	Output POGs a through n to a disk  file for  plotting
		on  calcomp  with PLTVEC  or  generating  video  with
		MIRTOP.  The file will be named NAMEn.GRF.  This com-
		mand must terminate with a carriage return and it al-
		ways expects a main command next.

NO		Deletes appropriate data structure.

	EDGE	Calling edge input routine  automatically deletes all
		previous edge points.

	LINES	Calling the line fitter  automatically deletes entire
		line and vertex data structure.
		SET COMMAND

SET		Allows user to  set values of various general program
		variables. Values in  parenthesis in descriptions are
		the initial values of the variables.

	SCALE a b	Sets display scale factors  for x (a=2.5) and
			y (b=2.5)  directions.  Effect is  to  change
			size of display about its internal axis.  The
			arguments are  real numbers.

	BRTSIZ a b	b is size or brightness for POG a (not inter-
			active)

	FULREC a	a (=0) is nonzero for full parser recursion

	LOC a b		The  page  printer  is  set  between  display
			coordinates  a  (=display  origin-30)  and  b
			(-510). The display update program will reset
			them whenever it is called.

	WHAT a		a (=0)  is nonzero  for typout of sections of
			program currently being executed.

	TRACE a		a (=0)  is nonzero to turn on trace output to
			TTY

	CVLIN a ⊗	a (=0)  is nonzero  to use CVs instead of SVs
			in display
 
	WIND a		a  (=0)  is  nonzero  for  display  windowing
			(limit display to inside frame ??)

	LDATE a ⊗	a (=1) is activation number to be assigned to
			created lines

	NAME a ⊗	a (=Z00) is scene name for file outputs

	LNCRE a b ⊗	LNCRE1←a  (=1) and LNCRE2←b (=1). Sets limits
			of creation numbers  which are active.

	DISRPT a b	Sets center  of display rectange to a (=215),
			b (=150). The effect is to move display.

	INTRPT a b	Sets  center of internal coordinate rectangle
			to a  (=150),  b (=115).   Moves display in a
			strange  way.  Do not use. Same as  MOVE com-
			mand.
		CALL COMMAND

CALL		Executes the  main modules  of GUNLO. See the section
		on operation  for examples  of how  these subcommands
		are used. The arguments are not interactive.

	LINFIT ⊗	Fits lines to edge  point data  and generates
			initial line and vertex  data structure.  All
			previous data structure is deleted.  All line
			and vertex displays are updated.
	SORTED		Sort edge pairs.  This  is also  done  by the
			INPUT EDGE command when  it inputs  the  edge
			points so it is not clear  why it should ever
			be necessary to do it again.

	XREF a		Generates the line cross reference table with
			line intersections and  merged CVs.   If a≠0,
			the routine's internal tables will be written
			out on file NAMEn.LPT. XREF is called intern-
			ally  by the parser, which expects  the  data
			structure to be unlinked  when it is entered.
			Therefore, if you use this command, you  must
			execute CALL  UNXREF before  trying to  parse
			the  scene.  Note  that  XREF only  processes
			active lines.

	UNXREF		Disconnect all active lines in XREF table and
			unlink  the  CVs.  This routine  is  normally
			called by the parser .

	FTEX		Extracts line  features and compound features
			in the active part of the  scene.  This rout-
			is normally called by the parser.

	PARSE a ⊗	Calls parser to parse the active scene, using
			string a for its control flags.   When it re-
			turns it will have isolated  as many  objects
			as it could.
		INPUT and SAVE COMMANDS

INPUT ⊗		Inputs  data  structures from stored disk files.  See 
		the section on FILES for  conventions.  The arguments
		are not interactive.

	EDGES a		Input edge points from file a.  If the exten-
			tion is .EDG or .DAT the edge points will  be
			sorted.  If you  plan  to  use the  same edge
			points more than once,you can speed up future
			processing  by writing  out  the  sorted edge
			points on a  file   with extension  .SED  and
			reading it on future runs.

	LINES a		Read in line and  vertex data  structure.  If
			you plan to use  the same data structure more
			than once, you can write out  the lines after
			LINFIT has been called and then,in the future
			read this file in, saving  the  time required
			to read in and fit the edge points.

	PROT a		Read in prototype data structure from file a.
			This must be  done before  any scenes  can be
			processed.

SAVE ⊗		Writes out data structures onto disk files.

	EDGE a 		Save edge points on file  a. The  file should
			have the extension .SED.

  	LINES a		Save line and vertex data structure on file a

  	PROT a		Save  the prototype data structure  on file a.
			This is only necessary when new prototypes are
			added.

	STRUCT		Output lines and CVs to file NAMEn.OUT for use
			by other programs.  The first line is the num-
			ber of active lines being written out. That is
			followed by one line of output for each active
			line, giving the  coordinates of the SVs, with
			the SV at the beginning of the line first, the
			index, into the next part of the output,of the
			CVs that the SVs are linked to, and the creat-
			ion number. Following the list of active lines
			is a line containing  the number  of CVs to be
			written out.  That  is followed  by the proper
			number of lines  of CV  data, giving the index
			number,  corresponding to  the  number  in the
			line data, and the coordinates of the CV. Some
			of the CVs are  not connected to active  lines
			and their coordinates will be zero.
		SHOW, KILL, CLEAR, and CLOSE COMMANDS

SHOW		Shows internal structures.  The arguments are not in-
		teractive.

	INTRPT		Types  the coordinates  of the  center of the
			internal coordinate system in  display  coor-
			dinates.

	LNFEAT a	Types  exploded line  feature word for line a
			and its entry number in the central tables.

	COFEAT a b	Types exploded compound feature word,  if any,
			for lines a and b, and its entry number in the
			central tables.

	CFEAT a		Types  exploded  compound  feature  word   for
			prototype line a.

	LFDIF a b c d	Types encoded actions to  make end d of line b
			similar to end c of line a. Also types sequen-
			tial modification word.

	FRAME ⊗		Turn on display frame (POG 1)

	EDGE a ⊗	Turn on edge display  (POGs 2  and 3).  If a=2,
			the edge pairs are displayed as short line seg-
			ments, showing  the  direction  of  the edge at
			that point; otherwise, points are displayed.

	LINES ⊗		Turn  on line  displays (POGs 4-6).

KILL ⊗		Turn off the specified displays.

	FRAME		POG 1
	EDGES		POG 2-3
	LINES		POG 4-6

CLEAR		Clear program execution counters (SAIL count option)

CLOSE		Output program execution counters
		EDIT COMMAND (COM and PROT)

EDIT		This is the most complex,  from  a  user standpoint),
		command in GUNLO.  It  allows  you  to add prototypes
		to the program, to  alter the  scene line  and vertex
		data  structure,  to  modified  the  stored   command
		strings, and to change internal parameters. Note that
		all groups of printing characters which are go be in-
		terpreted together must  have a  seperation character
		(space or carriage return) after them.

	COM		Calls the command editor to alter stored com-
			mands for later  execution.  When entered, it
			types string 0  and then  waits for input, in
			character mode. The inputs it recognizes are:

			E	to exit from the command editor  back
				to the regular command scanner

			n	to type command string 0≤n≤9

			←	the string  following  the  ←,  which 
				must  consist  of GUNLO commands, re-
				places the last  command string typed
				out by the editor.  The new string is
				terminated by an  asterisk.   The new
				string  is  stored with  asterisks as
				the  seperation   character   between
				commands  are arguments.  Remember to
				put a seperation character after ← !!

	PROT a		Create new prototypes. If a≠0,the line editor
			will be called to draw the prototype.  Other-
			wise it assumes the current active lines  de-
			fine the prototype.  They  can  be created by
			the line editor  or by  tracing an example of
			the prototype, fitting lines to the edges,and
			using the line editor as necessary to fix  up
			a  perfect  line drawing.  The current proto-
			types  are  generated  by  executing  command 
			files containing line editor commands.  These
			files are available on our user disk pack for
			anyone who would like to see them.  Note that
			once  a prototype  has  been merged  into the
			current prototype  data  structure, it cannot
			be seperated out again.
		EDIT COMMAND (PARAM)

	PARAM		This is the parameter editor.  It works  best
			in interactive  mode.   After  the  editor is
			entered,  typing E  will get  you back to the
			normal command  decoder.  Typing  the name of
			a parameter will cause  its value to be typed
			out.  If you follow  with  ← n (remember that
			space), n  becomes the new value of the para-
			meter;following with anything else will cause
			it to be accepted as another parameter  name.
			If you are not in interactive  mode, you  can
			still assign new values  and  the  old values
			will appear after the carriage return is seen.
			The list of parameters is below. Those marked
			* are read-only and cannot be changed.  Those
			marked  ⊗ are  real. Initial  values, if any,
			are given in brackets.

		NOEPL*	[NOEPA+NOEPM]  length  of arrays in edge data
			structure
		NOEPM*	[10] number of extra edge points allowed
			safety measure.
		NOEPA	number of edge points read in
		NOL*	number of lines created
		NOV*	number of composite vertices created
		IFREEL* pointer to first  free line storage (none iff
		=0)
		IFREEV* pointer  to  first free  CV  storage  (=0 iff
			IFREEL=0)
		MAXNOL*	maximum number of lines (array declaration)
		MSAFA	[20] absolute margin of safety (lines extra)
		MSAFR⊗	[.5] relative margin of safety 
		NOBAL*	initial line estimate based on edges
		MAXNOV*	[2*MAXNOL]  maximum number of vertices
		LDATE	[1] current level for activation-deactivation
		RDEP⊗	length of edge-pair set by edge input routine
		RMEDA⊗	[90] maximum  angle  between  edge  pairs for
			putting them in same line segment
		SHRINK⊗	[.5] distance lines are shrunk in LINFIT.
		RDDP⊗	[1.5] maximum  directed distance  (in 'DEP's)
			between edge-pairs  for  set  connection  (in
			edge-sort)
		ILLL	[2] least line-length accepted in initial fit
			(number of  edge-pairs)
		ILFL	[3] least  final line-length (after line-fus-
			ions)
		EDIT COMMAND (PARAM cont. AND LINES)

		RDNP⊗	[.45] maximum average  distance  to new edge-
			pair for assimilation into current line.
		RMSD⊗	[.3] maximum distance (number of  edge pairs)
			for vertex connections or line fusions within
			edge-pair sets.
		RMLG⊗	[0]  absolute  minimun  length  of  lines for
			acceptance by LINFIT.
		RWIC⊗	[3.5] maximum window width for collinearity.
		RMLE⊗	[15] maximum line-extension  (secondary vert-
			ices).
		RCDI⊗	[5] maximum corner distance for assuming iden-
			tity.
		RMALS⊗	[5] maximum absolute  line-shrinkage (at each
			end)
		RMRLS⊗	[.3] maximum relative line-shrinking
		RMAP⊗	[12] maximum angle for lines to be parallel

	LINES		Call the line editor. It types →  when  ready
			for a new command.  All the mysteries of this
			editor are not yet known, but its command de-
 			coder appears  to prefer  that  commands  end
			with  a  carriage return.  Below are its com-
			mands, as  well  as they are known:

		E		exit to main command decoder
		DEL a : b	delete line a (to line b if : b given)
		DEL LD a :b	delete lines at creation level a  (to
				level b if : b given)
		DEL ALL		delete all lines
		DEL ACT		delete all active lines
		DEL INA		delete all inactive lines
		DET a		detach  SV  a  from its  CV and leave
				free  if a<0,  else  make  connection
				temporary
		DIS a		Update display. If a is  given it be-
				comes the display  flag.  The display
				will be updated after each change  if
				the flag is ≠0.
		SET LDATE a	Sets current create number to a.
		SET LNCRE a b	Sets limits of current active levels.
		SET CVLIN a	display CVs instead of SVs iff a≠0
		MER a b		merges CVs containing SVs a and b
		ATT a b		add SV a to CV b (temporary  iff a<0)
				Create new CV if b=0.  Uses only act-
				ive lines if b>0 else all.
		PER a		make link from SV a to CV permanent
		TEM a		make link from SV a to CV temporary
		LCR LD a b	last item on LCREDE stack for line  a
				becomes b (new creation number)
		EDIT COMMAND (LINES cont.)

		LCR a : b c	last creation number  on LCREDE stack
				for lines a through b is set to c.
		INS a → b	a and b are two command sections. The
				first  defines  a  point  X1, Y1 and,
				possibly, a CV.    The second defines
				a point X2, Y2 and, possibly, another
				CV. The  command causes  a line to be
				inserted from X1, Y1 to X2, Y2.  If a
				CV  was  defined for  an  end, it  is
				linked to that CV; otherwise a new CV
				is created.   If the ., A, or R  com-
				mand section  is followed by L or LA,
				the  closest point  to  X1, Y1  on an
				active line becomes X1, XY  (if first
				command section) or the  intersection
				of the line between X1, Y1 and X2, Y2
				with an  active  line  becomes X2, Y2
				(if second command section). If LA is
				given,the second line is split at the
				intersection or  closest point  and a
				new CV is created for all lines.  The
				command sections are:

			@ a	use CV a coordinates 
			@ a * b c 	use CV a coordinates +(b,c)
			a	use CV a and its coordinates
			a *b  c use CV a and its coordinates +(b,c) 
			.	use last Xi,Yi obtained
			A a b	use a, b as coordinates
			R a b	use last Xi,Yi +(a,b)
		OPERATION

	The following command  string is sufficient to parse  a scene
with GUNLO:

INPUT PROT PROTO.GUN[SYS,HE] EDGES  filename CALL LINFIT PARSE NULL

where filename  contains  your edge  points.   To  display the  final
result and dump it for further processing you would say:

SET NAME scene LNCRE 2001 3000 SAVE STRUCT

where scene is the name you want the output file to have.

	There are several strings stored in GUNLO  for helping you do
more elaborate things.  The current strings are:

string 0:

INPUT PROT PROTO.GUN[SYS,HE]	which reads in the prototypes

string 1:

H SET DISRPT 0 0 SCALE 5 5 LNCRE 1 1 CVLIN 1 CALL LINFIT UNMARK LINES
KILL FRAME EDGES D

This holds  display updating,   moves your display  to the  center of
the  screen, enlarges the display,  resets the active  line limits in
case they were changed in an  earlier pass, sets the flag to  display
CVs,  fits lines  to your  edge points,  turns off  marking line  IDs
(which  the program turned  on),  kills the frame  around the display
and the edge point display (if you want to see  the edge points later
say SHOW EDGE 0), and updates the display. 


string 2:

H CALL PARSE NULL SET LNCRE 2000 2999 D

This holds  the  display, parses  the active  scene,  set the  active
limits to display the isolated objects, and updates the display.


	To run using these strings you need the following steps:

RUN GUNLO[SYS,HE]		1. read in program
DO COM 0			2. read in prototypes
INPUT EDGES file SET NAME scene 3. read in edge points and set scene
				   name.  The edge points will be
				   displayed.
DO COM 1			4. line fitting is performed.  The
				   fitted lines will be displayed.
DO COM 2			5. the scene is parsed and the final
				   result displayed.
SAVE STRUCT			6. output final structure to disk,
				   if desired.
				7. to parse another scene, return to
				   step 3